<!DOCTYPE html>
<html>
<head>
    <title>Stacked area</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" >

    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.dataviz.min.css" rel="stylesheet">

    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.dataviz.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
</head>
<body>
    <a class="offline-button" href="../index.html">Back</a>
    
        <div id="example" class="k-content">
            <div class="chart-wrapper">
                <div id="chart"></div>
            </div>
            <script>
                function createChart() {
                    $("#chart").kendoChart({
                title: {
                    text: "Browser Usage Trends"
                },
                legend: {
                    position: "bottom"
                },
                seriesDefaults: {
                    type: "area",
                    stack: true
                },
                series: [{
                    name: "Chrome",
                    data: [0, 0, 0, 0, 3.6, 9.8, 22.4, 34.6]
                },{
                    name: "Firefox",
                    data: [0, 23.6, 29.9, 36.3, 44.4, 46.4, 43.5, 37.7]
                },{
                    name: "Internet Explorer",
                    data: [76.2, 68.9, 60.6, 56.0, 46.0, 37.2, 27.5, 20.2]
                },{
                    name: "Mozilla",
                    data: [16.5, 2.8, 2.5, 1.2, 0, 0, 0, 0]
                },{
                    name: "Opera",
                    data: [1.6, 1.5, 1.5, 1.6, 2.4, 2.3, 2.2, 2.5]
                },{
                    name: "Safari",
                    data: [0, 0, 0, 1.8, 2.7, 3.6, 3.8, 4.2]
                }],
                valueAxis: {
                    labels: {
                        format: "{0}%"
                    },
                    line: {
                        visible: false
                    },
                    axisCrossingValue: -10,
                    max: 100
                },
                categoryAxis: {
                    categories: [2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011],
                    majorGridLines: {
                        visible: false
                    }
                },
                tooltip: {
                    visible: true,
                    format: "{0}%",
                    template: "#= series.name #: #= value #%"
                }
            });
                }

                $(document).ready(function() {
                    setTimeout(function() {
                        // Initialize the chart with a delay to make sure
                        // the initial animation is visible
                        createChart();

                        $("#example").bind("kendo:skinChange", function(e) {
                            createChart();
                        });
                    }, 400);
                });
            </script>
        </div>

</body>
</html>
